﻿<%@ Page Language="c#" Inherits="EPiServer.Labs.MobilePack.Site.MobileConnect" AutoEventWireup="false" CodeBehind="MobileConnect.aspx.cs" MasterPageFile="~/modules/MobilePack/Mobile.Master" %>

<asp:Content runat="server" ContentPlaceHolderID="BodyContents">

    <div data-role="page" class="mobilePage" data-theme='<%= GetSiteData()["PageTheme"] %>'>
        <div data-role="header" data-theme='<%= GetSiteData()["PageTheme"] %>'>
            <EPiServer:Property runat="server" CustomTagName="h1" PageLink='<%# StartingPoint %>' PropertyName="PageName" />
            <a href='<%= GetSiteData().LinkURL %>' data-icon="home" data-iconpos="notext" data-direction="reverse" class="ui-btn-left jqm-home">Home</a> 
        </div>
        <div data-role="content">
            <EPiServer:Property runat="server" CssClass="bodyContent" PropertyName="MainBody" PageLink='<%# StartingPoint %>' />
            <EPiServer:PageList ID="PageList1" runat="server" PageLink='<%# StartingPoint %>'
                AutoBind="true">
                <HeaderTemplate>
                    <ul data-role="listview" data-inset="true">
                </HeaderTemplate>
                <ItemTemplate>
                    <li><a href='<%# CurrentPage.LinkURL + "&depth="+(CurrentDepth+1).ToString()+"&srcid="+ Eval("PageLink") %>'>
                        <%# Eval("PageName") %></a></li></ItemTemplate>
                <FooterTemplate>
                    </ul>
                </FooterTemplate>
            </EPiServer:PageList>
        </div>
        <div data-role="footer" data-theme='<%= GetSiteData()["PageTheme"] %>'>
            <div data-role="navbar">
                <EPiServer:Property ID="Property2" runat="server" PropertyName="FooterText" PageLink='<%# GetSiteData().PageLink %>' />
                <EPiServer:Property ID="Property3" runat="server" PropertyName="FooterNavigation"
                    PageLink='<%# GetSiteData().PageLink %>' />
            </div>
        </div>
        <script>
            // This event gets called after a page has finished loading (same as $(document).ready() in jQuery).
            // Placed here because if bug in jQuery Mobile and pageinit not always firing
            $(".mobilePage").live('pageinit', MobilePack.pageInit);
        </script>
    </div>
</asp:Content>
